﻿
using System.Data;
using System.Data.SqlClient;
using System;
using FrameWork.Utility;
using InventoryProject.Framework.Entity;


namespace InventoryProject.FrameWork
{
    public class FormAccess
    {        
    
        public DataTable tForm_Save(string SType, FormEntity _entity, string LoginID)
        {
            SqlParameter[] param = new SqlParameter[7];
            param[0] = new SqlParameter("@pType", SType);
            param[1] = new SqlParameter("@pID", _entity.ID);
            param[2] = new SqlParameter("@pFormID", _entity.FormID);
            param[3] = new SqlParameter("@pFormNm", _entity.FormNm);
            param[4] = new SqlParameter("@pFilePath", _entity.FilePath);
            param[5] = new SqlParameter("@pModuleID", _entity.ModuleID);
            param[6] = new SqlParameter("@pLoginID", LoginID);
            return DBHelper.getDataTable_SP("sp_Form_Save", param);
        }
        public DataTable tForm_Qry(string FormID)
        {
            SqlParameter[] param = new SqlParameter[1];
            param[0] = new SqlParameter("@pFormID", FormID);
            return DBHelper.getDataTable_SP("sp_FormList_Qry", param);
        }
    }
}